package cn.iocoder.yudao.module.wecom.dal.mysql.cusfollowtag;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wecom.dal.dataobject.cusfollowtag.WeCusFollowTagDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wecom.controller.admin.cusfollowtag.vo.*;

/**
 * 客户跟进标签 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface WeCusFollowTagMapper extends BaseMapperX<WeCusFollowTagDO> {

    default PageResult<WeCusFollowTagDO> selectPage(WeCusFollowTagPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WeCusFollowTagDO>()
                .eqIfPresent(WeCusFollowTagDO::getWeCustomerId, reqVO.getWeCustomerId())
                .eqIfPresent(WeCusFollowTagDO::getWeUserId, reqVO.getWeUserId())
                .eqIfPresent(WeCusFollowTagDO::getTagId, reqVO.getTagId())
                .betweenIfPresent(WeCusFollowTagDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WeCusFollowTagDO::getId));
    }

}